#include <iostream>
using namespace std;

int main() {
    int n;
    int score;
    int max;
    cin >> n;
    if (n > 100 || n < 1)
    {
        cout << 0;
        return 0;
    }
    

    for (int i = 0; i < n; i++)
    {
        cin >> score;
        if (score > 100 || score < 0)
        {
            continue;
        }
        if (score > max)
        {
            max = score;
        }
    }
    cout << max;
    return 0;
}